<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


Route::get('api/hello', function () {
  echo 'api hello';
});


Route::get('api/think', function () {
  $mysetting = config("mysetting.img_prefix");
  echo $mysetting;
});

Route::post('api/login', 'api/IsAdmin/Login');

Route::get('api/getId', 'api/IsAdmin/getId');

Route::get('api/getHouseList', 'api/HouseCon/getHouseList');
Route::get('api/getHouseDetails', 'api/HouseCon/getHouseDetails');

Route::get('api/getSmallHouseList','api/HouseCon/smallHouseList');

Route::get('api/test', 'api/HouseCon/test');


/**
 *  --------------------------------
 *        admin
 * ---------------------------------
 */

Route::get('api/getHouseAllList', 'api/HouseCon/getHouseAllList');

//更新 或者新增 房屋信息
Route::post('api/addHouseHist', 'api/HouseCon/addHouseHist');

//更新 或者新增 banner
Route::post('api/addHouseBanner', 'api/Banner/addHouseBanner');
Route::get('api/deleteBanner', 'api/Banner/deleteCurrentBanner');
Route::post('api/addHouseMoreBanner','api/Banner/addHouseMoreBanner');

//上传图片
Route::post('api/upload', 'api/UploadCon/upload');

//
Route::post('api/uploadVideo', 'api/UploadCon/uploadVideo');

// 通过id 查找 该id 的所有banner
Route::get('api/getBanner', 'api/Banner/getBannerById');

//根据删除主键某一列

Route::get('api/deleteHouse', 'api/HouseCon/deleteCurrent');

/***********/

Route::get('detail', 'index/Index/detail');


/*委托相关接口*/
Route::post('api/rentingRegister', 'api/WeiTuo/rentingRegister');
Route::post('api/buyHouseRegister', 'api/WeiTuo/buyHouseRegister');
Route::post('api/haveHouseSell', 'api/WeiTuo/haveHouseSell');
Route::post('api/houseToLet', 'api/WeiTuo/houseToLet');


/*wx 开发*/

//wx login
Route::get('api/wxLogin', 'api/Wx/wxLogin');


//微信分享
Route::get('api/share', 'wx/JsSdk/getSignPackage');

Route::get('api/createMenu', 'wx/WxPublicNumber/definedItem');

Route::get('api/getAccessToken', 'wx/WxPublicNumber/getWxAccessToken');

Route::get('api/sendMessageAll', 'wx/SendMessageAll/sendMessageAll');

/*wx xcx login*/

Route::post('api/xcxLogin','wx/XcxLogin/login');
Route::get('api/searchKey','api/SearchKeyWords/getKeyWords');
Route::post('api/postUserInfo','wx/XcxLogin/postUserInfo');
Route::get('api/addHistory','wx/LookHistory/addHistory');
Route::get('api/getHistory','wx/LookHistory/getHistory');
Route::get('api/addCollection','wx/LookCollection/addCollection');
Route::get('api/cancelCollection','wx/LookCollection/cancelCollection');
Route::get('api/isCollection','wx/LookCollection/isCollection');
Route::get('api/getCollection','wx/LookCollection/getCollection');


/*个人博客文章接口*/

Route::post('api/editorArticle','api/ArticleC/editorArticle');

Route::get('api/getArticleById','api/ArticleC/getArticleById');

Route::get('api/getArticleAllList','api/ArticleC/getArticleAllList');








